package com.itany.boot.service;

import com.github.pagehelper.PageInfo;
import com.itany.boot.entity.Course;
import com.itany.boot.exception.CourseExistException;
import com.itany.boot.exception.FileUploadErrorException;
import com.itany.boot.exception.RequestParameterErrorException;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import javax.servlet.http.HttpSession;
import java.util.Map;

/**
 * @date 2025/10/12
 */
public interface CourseService {

    void addCourse(String courseName, String courseInfo, String author, CommonsMultipartFile file, String recommendationGrade, String courseTypeId, HttpSession session) throws RequestParameterErrorException, CourseExistException, FileUploadErrorException;

    PageInfo<Course> findPage(Course courseParam, String pageNo, String pageSize);

    Course findById(String id) throws RequestParameterErrorException;

    void modifyCourse(String id, String courseName, String courseInfo, String author, CommonsMultipartFile file, String recommendationGrade, String courseTypeId, HttpSession session) throws RequestParameterErrorException, CourseExistException, FileUploadErrorException;

    void modifyStatus(String id, String status) throws RequestParameterErrorException;
}
